package top.fengleifeng.question;

import java.util.LinkedList;
import java.util.List;

/**
 * @program: leetcode-test
 * @description:
 * @author: fengleifeng
 * @create: 2020-10-19 14:20
 **/
public class Num525连续数组 {
   /* class Solution {
        public int findMaxLength(int[] nums) {
            if (nums.length < 0) {
                return 0;
            }
            List<Integer> list = new LinkedList();
            int now = nums[0];
            int count = 1;
            for (int i = 1; i < nums.length; i++) {
                if (nums[i] == now) {
                    count++;
                } else {
                    list.add(count);
                    count = 1;
                    now = nums[i];
                }
            }
            list.add(count);
            if (list.size() <= 1) {
                return 0;
            }
            Integer before = null;
            int max = 0;
            for (Integer one : list) {
                if (before == null) {
                    before = one;
                } else {
                    max = Math.max(max, Math.min(before, one));
                    before = one;
                }
            }
            return max*2;
        }
    }
*/
   class Solution {
       public int findMaxLength(int[] nums) {
            return 0;
       }
   }
}
